package com.zhiwang.planet.ui.entertain

import android.view.View
import android.widget.ImageView
import com.bumptech.glide.Glide
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.zhiwang.planet.R
import com.zhiwang.planet.mvvm.model.entity.main.Banner

class BannerImageAdapter : BaseQuickAdapter<Banner, BannerImageAdapter.ViewHolder> {

    constructor() : super(R.layout.item_banner_image)

    class ViewHolder(itemView: View) : BaseViewHolder(itemView) {

        val image: ImageView = itemView.findViewById(R.id.image)
    }


    override fun convert(holder: ViewHolder, item: Banner?) {

        Glide.with(holder.image)
                .load(item?.img)
                .into(holder.image)
    }


}